<template>
  <div id="app">
    <!-- <searchHeader /> -->
    <!-- <div id="nav">
      <router-link to="/">Home</router-link> |
      <router-link to="/login">登录</router-link> |
      <router-link to="/register">注册</router-link> |
      <router-link to="/search">搜索</router-link> |
      <router-link to="/highsearch">高级搜索</router-link> |
      <router-link to="/searchresult">搜索结果</router-link> |
      <router-link to="/about">About</router-link> |
    </div> -->
    <router-view/>
  </div>
</template>
<script>
import searchHeader from "@/components/searchHeader.vue";

	export default {	
    components:{
      searchHeader
    },
    	
		created: function() {
      let _userInfo = localStorage.getItem('userInfo');
      let _token = localStorage.getItem('token');
      if(_userInfo&&_token){
        this.$store.state.userInfo = _userInfo;
        this.$store.state._token = JSON.stringify(_token);
        this.$store.state.login = true;
      }
		},
		mounted: function() {
			console.log('mounted')
		},
		destroyed: function() {
			console.log('destroyed')
		}
	}
</script>
<style lang="scss">
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
a{
  color: #000;
  text-decoration: none;
}
html,body,#app{
    width: 100%;
    min-height: 100%;
  }
#app {
  font-family: PingFang SC, Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
}

#nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>
